﻿using System.Collections.Generic;

namespace OpenMLTD.MillionDance.Core {
    partial class VmdCreator {

        internal enum FacialExpressionKind {

            Default = 0,
            VeryMildSmile = 1,
            StaringFarAway = 3,
            Happy = 5,
            RightEyeWink = 22 // Used in 自分REST@RT, the famous wink

        }

        // You can pose and test in PMXE
        internal static readonly IReadOnlyDictionary<FacialExpressionKind, IReadOnlyDictionary<string, float>> DefaultFacialExpressionTable = new Dictionary<FacialExpressionKind, IReadOnlyDictionary<string, float>> {
            [FacialExpressionKind.Default] = new Dictionary<string, float> {
                ["M_egao"] = 0,
                ["M_shinken"] = 0,
                ["M_wide"] = 0,
                ["M_up"] = 0,
                ["M_n2"] = 0,
                ["M_down"] = 0,
                ["M_odoroki"] = 0,
                ["M_narrow"] = 0,
                ["B_v_r"] = 0,
                ["B_v_l"] = 0,
                ["B_hati_r"] = 0,
                ["B_hati_l"] = 0,
                ["B_agari_r"] = 0,
                ["B_agari_l"] = 0,
                ["B_odoroki_r"] = 0,
                ["B_odoroki_l"] = 0,
                ["B_down"] = 0,
                ["B_yori"] = 0,
                ["E_metoji_r"] = 0,
                ["E_metoji_l"] = 0,
                ["E_wink_r"] = 0,
                ["E_wink_l"] = 0,
                ["E_open_r"] = 0,
                ["E_open_l"] = 0,
                ["EL_wide"] = 0,
                ["EL_up"] = 0,
            },
            // I can't differentiate this with the default expression...
            [FacialExpressionKind.VeryMildSmile] = new Dictionary<string, float> {
                ["M_egao"] = 0,
                ["M_shinken"] = 0,
                ["M_wide"] = 0,
                ["M_up"] = 0,
                ["M_n2"] = 0,
                ["M_down"] = 0,
                ["M_odoroki"] = 0,
                ["M_narrow"] = 0,
                ["B_v_r"] = 0,
                ["B_v_l"] = 0,
                ["B_hati_r"] = 0,
                ["B_hati_l"] = 0,
                ["B_agari_r"] = 0,
                ["B_agari_l"] = 0,
                ["B_odoroki_r"] = 0,
                ["B_odoroki_l"] = 0,
                ["B_down"] = 0,
                ["B_yori"] = 0,
                ["E_metoji_r"] = 0,
                ["E_metoji_l"] = 0,
                ["E_wink_r"] = 0,
                ["E_wink_l"] = 0,
                ["E_open_r"] = 0,
                ["E_open_l"] = 0,
                ["EL_wide"] = 0,
                ["EL_up"] = 0,
            },
            [FacialExpressionKind.StaringFarAway] = new Dictionary<string, float> {
                ["M_egao"] = 0,
                ["M_shinken"] = 0.32f,
                ["M_wide"] = 0,
                ["M_up"] = 0,
                ["M_n2"] = 0,
                ["M_down"] = 0,
                ["M_odoroki"] = 0,
                ["M_narrow"] = 0,
                ["B_v_r"] = 0.12f,
                ["B_v_l"] = 0.12f,
                ["B_hati_r"] = 0.40f,
                ["B_hati_l"] = 0.40f,
                ["B_agari_r"] = 0,
                ["B_agari_l"] = 0,
                ["B_odoroki_r"] = 0,
                ["B_odoroki_l"] = 0,
                ["B_down"] = 0,
                ["B_yori"] = 0,
                ["E_metoji_r"] = 0,
                ["E_metoji_l"] = 0,
                ["E_wink_r"] = 0,
                ["E_wink_l"] = 0,
                ["E_open_r"] = 0,
                ["E_open_l"] = 0,
                ["EL_wide"] = 0,
                ["EL_up"] = 0,
            },
            [FacialExpressionKind.Happy] = new Dictionary<string, float> {
                ["M_egao"] = 0,
                ["M_shinken"] = 0,
                ["M_wide"] = 0,
                ["M_up"] = 0,
                ["M_n2"] = 0,
                ["M_down"] = 0,
                ["M_odoroki"] = 0,
                ["M_narrow"] = 0,
                ["B_v_r"] = 0,
                ["B_v_l"] = 0,
                ["B_hati_r"] = 0,
                ["B_hati_l"] = 0,
                ["B_agari_r"] = 0,
                ["B_agari_l"] = 0,
                ["B_odoroki_r"] = 0,
                ["B_odoroki_l"] = 0,
                ["B_down"] = 0,
                ["B_yori"] = 0,
                ["E_metoji_r"] = 0,
                ["E_metoji_l"] = 0,
                ["E_wink_r"] = 1.0f,
                ["E_wink_l"] = 1.0f,
                ["E_open_r"] = 0,
                ["E_open_l"] = 0,
                ["EL_wide"] = 0,
                ["EL_up"] = 0,
            },
            [FacialExpressionKind.RightEyeWink] = new Dictionary<string, float> {
                ["M_egao"] = 0,
                ["M_shinken"] = 0,
                ["M_wide"] = 0,
                ["M_up"] = 0,
                ["M_n2"] = 0,
                ["M_down"] = 0,
                ["M_odoroki"] = 0,
                ["M_narrow"] = 0,
                ["B_v_r"] = 0,
                ["B_v_l"] = 0,
                ["B_hati_r"] = 0,
                ["B_hati_l"] = 0,
                ["B_agari_r"] = 0,
                ["B_agari_l"] = 0,
                ["B_odoroki_r"] = 0,
                ["B_odoroki_l"] = 0,
                ["B_down"] = 0,
                ["B_yori"] = 0,
                ["E_metoji_r"] = 0,
                ["E_metoji_l"] = 0,
                ["E_wink_r"] = 1,
                ["E_wink_l"] = 0,
                ["E_open_r"] = 0,
                ["E_open_l"] = 0,
                ["EL_wide"] = 0,
                ["EL_up"] = 0,
            },
        };

    }
}
